package com.hibegin.http.server.web;

import com.hibegin.http.server.impl.HttpRequest;
import com.hibegin.http.server.impl.HttpResponse;

/**
 * Web 拦截器：在响应头里增加跨域处理
 * @author 张勇
 */
public class Interceptor4AddCrossDomainHeaders implements Interceptor {
	@Override
	public boolean doInterceptor(HttpRequest request, HttpResponse response) throws Exception {
		// 在响应头里增加跨域处理
		response.addHeader("Access-Control-Allow-Origin", "*");
		return true;
	}
}
